/*
 * Created on 28/10/2009
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package org.jma.app.ewisdom.entities;

import java.util.Iterator;
import java.util.Vector;

import org.jma.lib.soap.utils.XMLSerializable;
import org.jma.lib.utils.strings.StringFormat;

import com.thoughtworks.xstream.XStream;
/**
 * UserVector class stores an updated copy of 
 * all the users. It's used to return a vector of all the Users to a Client application<br>
 * @author Jesus Mari, jesmari@ono.com
 * @version 1.0
 * @since 1.0
 */
public class UserVector extends Vector implements XMLSerializable{

	
    public String serializeToXML() {
    	XStream xstream = new XStream();
    	return xstream.toXML(this);
    }
    
	public String serializeToXMLold() {
		StringBuffer response= new StringBuffer();
        response.append("<usersVector>");
        Iterator iter = this.iterator();
        while (iter.hasNext()) {
             User user = (User) iter.next();
             response.append(user.serializeToXML());
        }
            
        
        response.append("</usersVector>");
        return response.toString();
	}

}
